package com.sdweizan.sdk.bytedance.api.impl;

import com.alibaba.fastjson.TypeReference;
import com.sdweizan.sdk.bytedance.api.BdApiService;
import com.sdweizan.sdk.bytedance.api.BdMiniAppService;
import com.sdweizan.sdk.bytedance.bean.customer.BdCustomerMessage;
import com.sdweizan.sdk.bytedance.bean.customer.BdMessageSendResponse;
import com.sdweizan.sdk.bytedance.error.BdErrorException;
import lombok.AllArgsConstructor;

@AllArgsConstructor
public class BdCustomerService {
  private final BdApiService bdApiService;

  public BdMessageSendResponse sendMessage(BdCustomerMessage customerMessage)
      throws BdErrorException {
    return bdApiService.post(customerMessage, new TypeReference<BdMessageSendResponse>() {});
  }
}
